package com.example.demo.mapper;

import com.example.demo.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2025-05-27
 * Time:20:41
 */
@Mapper
public interface MessageInfoMapper {
    /*发布留言*/
    @Insert("insert into message_info(`from`, `to`, `message`)values (#{from}, #{to}, #{message})")
    Integer insertMessage(MessageInfo messageInfo);
    /*获取留言列表*/
    @Select("select * from message_info where delete_flag =0")
    List<MessageInfo> selectAllList();
}
